<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>高度自适应</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .header,.footer{
            height: 50px;
            background: yellow;
        }
        .body{
            background: red;
            min-height: 500px;
            max-height: 1000px;
            min-width: 100px;
            max-width: 2000px;
        }
        li{
            height: 100px;
        }
    </style>
</head>
<body>
    <div class="header"></div>
    <div class="body">
        <ul>
            <li>11111111</li>
            <li>11111111</li>
            <li>11111111</li>
            <li>11111111</li>
            <li>11111111</li>
        </ul>
    </div>
    <div class="footer"></div>
</body>
</html>